<template>
	<div class="block">
	   
	    <el-pagination
	      @size-change="handleSizeChange"
	      @current-change="handleCurrentChange"
	      :current-page="page.currPage"
	      :page-sizes="[1, 2, 3, 4]"
	      :page-size="page.pageSize"
	      layout="total, sizes, prev, pager, next, jumper"
	      :total="page.total">
	    </el-pagination>
	  </div>
</template>

<script>
	export default{
		props:["page"],
		methods:{
			handleSizeChange(val) {
			       //console.log(`每页 ${val} 条`);
							  // this.page.pageSize=val;
							  // this.initTable();
							  // pageSize
							  console.log("当前是第"+this.page.currPage+"页")
							  
							  // 子传父    自定义事件   {pageSize,currPage}
							  this.$emit("mypage",{pageSize:val,currPage:this.page.currPage});
			     },
			     handleCurrentChange(val) {
			      // console.log(`当前页: ${val}`);
							 // this.page.currPage=val;
							 // this.initTable();
							 this.$emit("mypage",{pageSize:this.page.pageSize,currPage:val});
			     },
		},
		
	}
	
	
</script>

<style>
</style>
